package com.codeczx.customviewdemo.limitedscroller;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.codeczx.customviewdemo.R;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

public class LimitedScrollerActivity extends AppCompatActivity {

    @BindView(R.id.limited_scroller)
    LimitedScroller limitedScroller;
    private LimitedAdapter limitedAdapter;
    private List<String> list;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_limited_scroller);
        ButterKnife.bind(this);
        list = new ArrayList<>();
        for (int i = 0; i < 4; i++) {
            list.add("item"+i);
        }
        limitedAdapter = new LimitedAdapter(this,list);
        limitedScroller.setAdapter(limitedAdapter);
        limitedScroller.startScroll();
    }
}
